/**
 * File    : LocaleOptionModel.java
 * Created : 2008-10-16
 * By      : LuHuiguo
 */
package com.luhuiguo.tapestry.model;

import java.util.Locale;
import java.util.Map;

import org.apache.tapestry5.OptionModel;

/**
 * @author LuHuiguo
 * @version $Id: LocaleOptionModel.java 2 2008-10-18 04:37:52Z LuHuiguo $
 * 
 */
public class LocaleOptionModel implements OptionModel {

	private Locale locale;

	public LocaleOptionModel(Locale locale) {
		this.locale = locale;
	}

	@Override
	public String getLabel() {
		return locale.getDisplayName(locale);
	}

	@Override
	public boolean isDisabled() {
		return false;
	}

	@Override
	public Map<String, String> getAttributes() {
		return null;
	}

	@Override
	public Object getValue() {
		return locale;
	}

}
